package graph.geometricshapes
{
	public class GeometricShapeFactory 
	{
	   	public static var currentShape:GeometricShape;

	    public static function createShape(shapeName:String, width:Number, height:Number):GeometricShape
	    {
	    	var geomShape:GeometricShape = null;
	        switch (shapeName)
	        {
                case GeometricEllipse.NAME:
                    geomShape = new GeometricEllipse(width, height);
                    break;            
                case GeometricLine.NAME:
                    geomShape = new GeometricLine(width,height);
           			break;
	            case GeometricRectangle.NAME:
	                geomShape = new GeometricRectangle(width, height);
	            	break;
	            case GeometricTriangle.NAME:
	            	geomShape = new GeometricTriangle(width, height);
	            	break;
	            case GeometricPolygon.NAME:
	            	geomShape = new GeometricPolygon(width, height);
	            	break;
            }
            return geomShape;
	    }
	}
}